<?php if (!defined('THINK_PATH')) exit();?>

<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/style.css" />
<script type="text/javascript" src="__TMPL__Common/js/check_dog.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/IA300ClientJavascript.js"></script>
<script type="text/javascript">
	var ACTION_ID ='<?php echo $action_id ?>';
 	var VAR_MODULE = "<?php echo conf("VAR_MODULE");?>";
	var VAR_ACTION = "<?php echo conf("VAR_ACTION");?>";
	var MODULE_NAME	=	'<?php echo MODULE_NAME; ?>';
	var ACTION_NAME	=	'<?php echo ACTION_NAME; ?>';
	var ROOT = '__APP__';
	var ROOT_PATH = '<?php echo APP_ROOT; ?>';
	var CURRENT_URL = '<?php echo trim($_SERVER['REQUEST_URI']);?>';
	var INPUT_KEY_PLEASE = "<?php echo L("INPUT_KEY_PLEASE");?>";
	var TMPL = '__TMPL__';
	var APP_ROOT = '<?php echo APP_ROOT; ?>';
	var LOGINOUT_URL = '<?php echo u("Public/do_loginout");?>';
	var WEB_SESSION_ID = '<?php echo es_session::id(); ?>';
	var EMOT_URL = '<?php echo APP_ROOT; ?>/public/emoticons/';
	var MAX_FILE_SIZE = "<?php echo (app_conf("MAX_IMAGE_SIZE")/1000000)."MB"; ?>";
	var FILE_UPLOAD_URL ='<?php echo u("File/do_upload");?>' ;
	CHECK_DOG_HASH = '<?php $adm_session = es_session::get(md5(conf("AUTH_KEY"))); echo $adm_session["adm_dog_key"]; ?>';
	function check_dog_sender_fun()
	{
		window.clearInterval(check_dog_sender);
		check_dog2();
	}
	var check_dog_sender = window.setInterval("check_dog_sender_fun()",5000);
	
</script>
	<script type="text/javascript" src="__TMPL__Common/js/cropper/jquery.min.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.timer.js"></script>

<link rel="stylesheet" type="text/css" href="__TMPL__Common/style/weebox.css" />
<script type="text/javascript" src="__TMPL__Common/js/jquery.bgiframe.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/jquery.weebox.js"></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/cropper.min.css" />
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/cropper/main.css" />
<script type="text/javascript" src="__TMPL__Common/js/cropper/cropper.min.js"></script>

<script type="text/javascript" src="__TMPL__Common/js/script.js"></script>
<script type="text/javascript" src="__ROOT__/public/runtime/admin/lang.js"></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/kindeditor.js'></script>
<script type='text/javascript'  src='__ROOT__/admin/public/kindeditor/lang/zh_CN.js'></script>


</head>
<body onLoad="javascript:DogPageLoad();">
<div id="info"></div>

<script type="text/javascript" src="__TMPL__Common/js/paigoods.js"></script>
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<link rel="stylesheet" type="text/css" href="__TMPL__Common/js/calendar/calendar.css" />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.js"></script>
<div class="main">
<div class="main_title_list"><div class="list-line-ico"></div>家族列表</div>
<?php function getStatus($status){
		switch($status){
			case '0': return '未审核';
			case '1': return '审核通过';
			case '2': return '拒绝通过';
		}
	}
    function head_image($head_image){
        return "<img src='".$head_image."' style='height:35px;width:35px;'/>";
    }
	function dissolve($id){
		return "<span onclick='dissolve(".$id.");'></span>";
	} ?>
<script type="text/javascript">
	function dissolve(id){
		location.href = ROOT+"?"+VAR_MODULE+"=Family&"+VAR_ACTION+"=dissolve&id="+id;
	}
</script>
<div class="search_row">
	<form name="search" action="__APP__" method="get">
		家族名：<input type="text" class="textbox" name="name" value="<?php echo trim($_REQUEST['name']);?>" />
		族长名：<input type="text" class="textbox" name="nick_name" value="<?php echo trim($_REQUEST['nick_name']);?>" />
		状态：<select name="status">
			<option value="-1" >所有</option>
			<option value="0"<?php if($_REQUEST['status'] == 0): ?>selected="selected"<?php endif; ?>>未审核</option>
			<option value="1"<?php if($_REQUEST['status'] == 1): ?>selected="selected"<?php endif; ?>>审核通过</option>
			<option value="2"<?php if($_REQUEST['status'] == 2): ?>selected="selected"<?php endif; ?>>拒绝通过</option>
		</select>
		创建时间：<span><input type="text" class="textbox" name="begin_time" id="begin_time" value="<?php echo trim($_REQUEST['begin_time']);?>" onfocus="return showCalendar('begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_begin_time');" />
		<input type="button" class="button" id="btn_begin_time" value="<?php echo L("SELECT_TIME");?>" onclick="return showCalendar('begin_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_begin_time');" /></span>
		-
		<span><input type="text" class="textbox" name="end_time" id="end_time" value="<?php echo trim($_REQUEST['end_time']);?>" onfocus="return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_end_time');" /><input type="button" class="button" id="btn_end_time" value="<?php echo L("SELECT_TIME");?>" onclick="return showCalendar('end_time', '%Y-%m-%d %H:%M:%S', false, false, 'btn_end_time');" /></span><input type="hidden" value="Family" name="m" /><input type="hidden" value="index" name="a" /><input type="submit" class="button" value="<?php echo L("SEARCH");?>" />
	</form>
</div>
<!-- Think 系统列表组件开始 -->
<table id="dataTable" class="dataTable" cellpadding=0 cellspacing=0 ><tr><td colspan="10" class="topTd" ></td></tr><tr class="row" ><th width="5%"><a href="javascript:sortBy('id','<?php echo ($sort); ?>','Family','index')" title="按照<?php echo L("ID");?><?php echo ($sortType); ?> "><?php echo L("ID");?><?php if(($order)  ==  "id"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="15%"><a href="javascript:sortBy('name','<?php echo ($sort); ?>','Family','index')" title="按照家族名<?php echo ($sortType); ?> ">家族名<?php if(($order)  ==  "name"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="10%"><a href="javascript:sortBy('logo','<?php echo ($sort); ?>','Family','index')" title="按照家族LOGO<?php echo ($sortType); ?> ">家族LOGO<?php if(($order)  ==  "logo"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="20%"><a href="javascript:sortBy('manifesto','<?php echo ($sort); ?>','Family','index')" title="按照家族宣言<?php echo ($sortType); ?> ">家族宣言<?php if(($order)  ==  "manifesto"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th><a href="javascript:sortBy('contribution','<?php echo ($sort); ?>','Family','index')" title="按照家族长收益<?php echo ($sortType); ?> ">家族长收益<?php if(($order)  ==  "contribution"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="10%"><a href="javascript:sortBy('nick_name','<?php echo ($sort); ?>','Family','index')" title="按照族长名<?php echo ($sortType); ?> ">族长名<?php if(($order)  ==  "nick_name"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="10%"><a href="javascript:sortBy('create_time','<?php echo ($sort); ?>','Family','index')" title="按照创建时间<?php echo ($sortType); ?> ">创建时间<?php if(($order)  ==  "create_time"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="10%"><a href="javascript:sortBy('memo','<?php echo ($sort); ?>','Family','index')" title="按照备注<?php echo ($sortType); ?> ">备注<?php if(($order)  ==  "memo"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="10%"><a href="javascript:sortBy('status','<?php echo ($sort); ?>','Family','index')" title="按照状态<?php echo ($sortType); ?> ">状态<?php if(($order)  ==  "status"): ?><img src="__TMPL__Common/images/<?php echo ($sortImg); ?>.gif" width="12" height="17" border="0" align="absmiddle"><?php endif; ?></a></th><th width="60px">操作</th></tr><?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$jia): ++$i;$mod = ($i % 2 )?><tr class="row" ><td><?php echo ($jia["id"]); ?></td><td><?php echo ($jia["name"]); ?></td><td><?php echo (head_image($jia["logo"])); ?></td><td><?php echo ($jia["manifesto"]); ?></td><td><?php echo ($jia["contribution"]); ?></td><td><?php echo ($jia["nick_name"]); ?></td><td><?php echo ($jia["create_time"]); ?></td><td><?php echo ($jia["memo"]); ?></td><td><?php echo (getStatus($jia["status"])); ?></td><td class="op_action"><div class="viewOpBox_demo"> <a href="javascript:edit('<?php echo ($jia["id"]); ?>')">家族详情</a>&nbsp; <a href="javascript:view('<?php echo ($jia["id"]); ?>')">成员列表</a>&nbsp; <a href="javascript:dissolve('<?php echo ($jia["id"]); ?>')">解散家族</a>&nbsp;</div><a href="javascript:void(0);" class="opration"><span>操作</span><i></i></a></td></tr><?php endforeach; endif; else: echo "" ;endif; ?><tr><td colspan="10" class="bottomTd"> &nbsp;</td></tr></table>
<!-- Think 系统列表组件结束 -->

<div class="page"><?php echo ($page); ?></div>
</div>
</body>
</html>